/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.asset.controller;

import cn.hutool.core.lang.tree.Tree;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.asset.model.query.DeviceCategoryQuery;
import top.continew.admin.asset.model.req.DeviceCategoryReq;
import top.continew.admin.asset.model.resp.DeviceCategoryResp;
import top.continew.admin.asset.service.DeviceCategoryService;
import top.continew.admin.common.controller.BaseController;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.continew.starter.extension.crud.enums.Api;
import top.continew.starter.extension.crud.model.query.SortQuery;

import java.util.List;

/**
 * 资产-设备-分类管理 API
 *
 * @author CharlieYan
 * @since 2025/02/27 17:12
 */
@Tag(name = "资产管理-设备-分类 API")
@RestController
@CrudRequestMapping(value = "/asset/device/category", api = {Api.TREE, Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE,
    Api.DELETE, Api.EXPORT})
public class DeviceCategoryController extends BaseController<DeviceCategoryService, DeviceCategoryResp, DeviceCategoryResp, DeviceCategoryQuery, DeviceCategoryReq> {

    @Override
    public List<Tree<Long>> tree(DeviceCategoryQuery query, SortQuery sortQuery) {
        return super.tree(query, sortQuery);
    }

}